<template>
	<div class="f2bpm-page-layout">
		<form id="form1">
			<div id="layoutDiv" style="width: 100%; overflow: auto;">
				<div id="centerDiv" style="overflow: auto;">
					<div id="f2bpmflow" style="float: left;"></div>
				</div>
			</div>

		</form>
	</div>
</template>

<script>
	export default {
		// onPullDownRefresh: function() {
		// 	//下拉刷新
		// 	var that = this;
		// 	window.location.reload();
		// 	uni.stopPullDownRefresh();
		// },
		
		onLoad: function(option) {
			var that = this;
			var success = that.$store.getters.validateLogin;
			if (!success) {
				FUI.Window.showMsg("您未登录")
				return false;
			}
		},
		created() {
			var that = this;
			that.wid = Object.toQueryString("wid") || "";
			that.wiid = Object.toQueryString("wiid") || "";
			window.oper = 1;
			window.isSysWorking = false;
			$("body").removeClass("class");
			window.wid = that.wid;
			window.wiid = that.wiid;
			window.outer = 0;
			window.prodessDefData = {};
			if (outer == "1") {
				prodessDefData = Object.toAjaxJson("/workflow/public/", "getWorkflowMapJson", {
					wid: that.wid,
					wiid: that.wiid
				});
			} else {
				prodessDefData = Object.toAjaxJson("/workflow/flowDesigner/", "getWorkflowMapJson", {
					wid: that.wid,
					wiid: that.wiid
				});
			}
			window.wfData = {};
			window.wf = prodessDefData.data.xmlToJson;
			window.wfClone = $.extend(true, {}, wf);
			window.gf = prodessDefData.data.designerJson;
			window.gfClone = $.extend(true, {}, gf);
			window.approvalRecord = prodessDefData.data.approvalRecord; //历史审批记录
			window.wfTemp = {};
			window.wfNodeTemp = {};
			window.wfLineTemp = {};
			var openDesign = true;
			var designer = null;
			$(function() {
				setTimeout(function() {
					designer = F2BPM.FlowDesigner.create("f2bpmflow");
					designer.designerPath = __projectPath+"/static/f2bpmDesigner";
					designer.editable = false;
					designer.showActivityApproval = null;
					designer.activityApprovalId = "activityApprovalblok";
					isSysWorking = true;
					designer.loadFlowData(gf);
					isSysWorking = false;
					designer.bind();

					$("#f2bpmflow_4").width(1500);
					$("#f2bpmflow_4").height(1500);
					$("#wftoolbar").hide();
				}, 500);
			});

		},
		data() {
			return {
				wid: "",
				wiid: ""
			}
		},
		methods: {}
	}
</script>
<style>
</style>
